<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8"/>
        <title>PHP+MySQLI的学生信息管理</title>
        <link type="text/css" rel="stylesheet" href="./bootstrap.min.css"/>
        <script type="text/javascript">
            function doDel(id){
                if(confirm("确定要删除吗？")){
                    //跳转
                    window.location.href="__URL__/del/id/"+id;
                }
            }
        </script>
    </head>
    <body>
        <center>
            <h3>浏览学生信息</h3>
             @include("photo.menu")
            <table width="700" border="1">
               <tr>
		   <th>图片</th>
		   <th>描述</th>
		   <th>发布时间</th>
		   <th>操作</th>
	      </tr>
                @foreach ($list as $photo)
                    <tr>
                        <td>{{$photo->photo}}</td>
                        <td>{{$photo->title}}</td>
                        <td>{{$photo->addtime}}</td>
                           <td>
                              <form action="{{url('photo/ destroy')}}" method="POST">
                              <input type="hidden" name="_method" value="DELETE">
			      <input type="hidden" name="_token" value="{{ csrf_token() }}">
			      <input type="hidden" name="id" value='{{$photo->id}}'>
			      <input type="submit" value="删除">
			      </form>
							 

                                <a href="photo/{{$photo->id}}/edit"> 编辑</a>
                            </td>
                        
                    </tr>
               @endforeach
            </table>
            
        </center>
    </body>
</html>